using System;
using System.Collections.Generic;
namespace DalatCooking.Core
{
    public class CategoryManager
    {
        static CategoryAccessor accessor = new CategoryAccessor();
        public static bool Insert(Category entity)
        {
            return accessor.Insert(entity);
        }
        public static bool Update(Category entity)
        {
            return accessor.Update(entity);
        }
        public static bool Delete(int id)
        {
            return accessor.Delete(id);
        }
        public static bool Delete(Category entity)
        {
            return accessor.Delete(entity);
        }
        public static List<Category> FindAll()
        {
            return accessor.FindAll();
        }
        public static Category FindById(int id)
        {
            return accessor.FindById(id);
        }
        public static Category Single(int id)
        {
            return accessor.Single(id);
        }
        public static Category FindByName(string name)
        {
            return accessor.FindByName(name);
        }
        public static List<Category> PagingSql(int pageSize, int pageNum, out int totalRowCount)
        {
            return accessor.PagingSql(pageSize, pageNum, out totalRowCount);
        }
        public static List<Category> PagingLinq(int pageSize, int pageNum, out int totalRowCount)
        {
            return accessor.PagingLinq(pageSize, pageNum, out totalRowCount);
        }
        public static bool SetActive(int id)
        {
            return accessor.SetActive(id);
        }
        public static bool SetSortIndex(int id, int isup)
        {
            return accessor.SetSortIndex(id, isup);
        }
        public static bool RemoveSelectedItem(int id)
        {
            return accessor.RemoveSelectedItem(id);
        }
        public static bool RemoveAll()
        {
            return accessor.RemoveAll();
        }
        public static bool RestoreSelectedItem(int id)
        {
            return accessor.RestoreSelectedItem(id);
        }
        public static bool RestoreAll()
        {
            return accessor.RestoreAll();
        }
    }
}